package com.leyou.order.client;

import com.leyou.order.dto.AddressDTO;

import java.util.ArrayList;
import java.util.List;

public abstract class AddressClient {
    public static final List<AddressDTO> addressList = new ArrayList<AddressDTO>(){
        {
            AddressDTO address = new AddressDTO(1L,"广东省东莞市","东莞市","厚街镇",
                "民哥","15100000000","广东","1422332",true);
            add(address);
        }

    };

    public static AddressDTO findById(Long id) {
        for (AddressDTO addressDTO : addressList) {
            if (addressDTO.getId() == id) return addressDTO;
        }
        return null;
    }
}
